Note: SymPy is optional. Without sympy, Some cells will fail to run, but this will not affect the result as SymPy is only used to display the matrices in LaTeX.

Task 1: 3D-2D Camera Calibration

1.3 Compute Calibration Matrix P and project correspondence points to pixel coordinate system

1.4 Extrinsic and Intrinsic Parameters

1.5: Focal Length and Pitch Angle

The position, ${\displaystyle C}$, of the camera expressed in world coordinates is ${\displaystyle C=-R^{-1}T=-R^{T}T}$.

$$ \cos \theta = \frac{\vec{c} \cdot \vec{p}}{\left\Vert\vec{c}\right\Vert \cdot \left\Vert\vec{p}\right\Vert} $$

where $c, p \in \mathbb{R}^{3}$

We can get the angle using

$$ \theta = \arccos (\cos (\theta)) $$

1.6 Resize

Task 2: Two-View DLT based Homography Estimation

2.1 Code, images used, and correspondence points

2.2 Compute homography matrix H

2.3 Warp image using H